package web.stu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import web.stu.model.dto.CourseDTO;
import web.stu.model.dto.course.QueryCourseDTO;
import web.stu.model.entity.Course;
import web.stu.model.vo.CourseVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author administer
 * @description 针对表【course(课程表)】的数据库操作Service
 * @createDate 2025-05-13 19:55:14
 */
public interface CourseService extends IService<Course> {
    Page<CourseVO> pageCourses(QueryCourseDTO queryCourseDTO, HttpServletRequest requests);

//    Page<CourseVO> pageCourses(Integer pageNum, Integer pageSize);

    void addCourse(CourseDTO courseDTO);

    void updateCourse(CourseDTO courseDTO, HttpServletRequest request);

    void deleteCourseById(Integer id, HttpServletRequest request);

    CourseVO getCourseById(Integer id, HttpServletRequest request);

    /**
     * 根据学生id 与教师id 查询 该教师 教授并且该课程学生选择的课程
     *
     * @param studentId
     * @param teacherId
     * @param request
     * @return
     */
    List<CourseVO> listCourseByStudentIdAndTeacherIdAndClassId(Integer studentId, Integer teacherId, Integer classId, HttpServletRequest request);


}
